<?php 
global $redirect, $login_error;
?>
<form method="post" action="<?=REQUEST_BASE?>login/" id="login">
	<h3>Sign in</h3>
	<table>
		<col width="78" />
		<col width="142" />
		<tr>
			<td class="label"><label for="username">Username</label></td>
			<td>
				<input type="text" name="id" id="username" class="text" />
				<?php if($error['id']) { ?>
				<br />
				<strong class="error"><?=$login_error['id']?></strong>
				<?php }?>
			</td>
		</tr>
		<tr>
			<td class="label"><label for="password">Password</label></td>
			<td>
				<input type="password" name="password" id="password" class="text" />
				<?php if($error['password']) { ?>
				<br />
				<strong class="error"><?=$login_error['password']?></strong>
				<?php }?>
			</td>
		</tr>
		<tr>
			<td class="label"><input type="checkbox" name="stay" id="stay" class="checkbox" /></td>
			<td><label for="stay">Stay signed in</label></td>
		</tr>
		<tr>
			<td></td>
			<td>
				<?php if($redirect) { ?><input type="hidden" value="<?=$redirect?>" name="redirect" /><?php }?>
				<input type="submit" id="submit" value="Sign in" class="button" />
			</td>
		</tr>
		<tr>
			<td></td><td>Forgot your password?<br /><a href="<?=REQUEST_BASE?>forget/">Fetch</a></td>
		</tr>
		<tr>
			<td></td><td>Don’t have an ID?<br /><a href="<?=REQUEST_BASE?>register/">Apply now</a></td>
		</tr>
	</table>
</form>